package cn.hughie.thread;

/**
 * 线程中断适用于取消某个异步操作的情况
 *
 * @Author yuh
 * @Date Created in 上午7:50 2018/5/24
 * @Description
 */
public class Thread4 extends Thread {
    @Override
    public void run() {
        try {
            Thread.sleep(10000000000000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws InterruptedException {
        Thread4 t = new Thread4();
        t.start();
        t.interrupt();
    }
}
